package ttk.muxiuesd.entity.bullet;

import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import ttk.muxiuesd.assetsloader.AssetsLoader;
import ttk.muxiuesd.entity.EntityGroup;
import ttk.muxiuesd.entity.Group;

public class BulletFire extends Bullet {
    public static TextureRegion img = new TextureRegion(AssetsLoader.getInstance().get("bullet/flame.png", Texture.class));

    public BulletFire(EntityGroup entityGroup, Group group) {
        super(entityGroup, group, 1, 1);
        textureRegion = img;
        setSize(0.5f, 0.5f);
        damage = 1f;
        setMaxLiveTime(3f);
        setLiveTime(0f);
        speed = 15f;
    }

    @Override
    public void update(float delta) {
        super.update(delta);

        setLiveTime(getLiveTime() + delta);
        this.x = x + speed * delta * xDirection;
        this.y = y + speed * delta * yDirection;
    }

}
